package controllers;

import java.io.IOException;
import java.util.ArrayList;
import java.util.TreeMap;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import systems.CurrentDomain;

import crawlers.WebpagetestCrawler;
import entities.Domain;

public class HomeServlet extends HttpServlet{
	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException {
		TreeMap<String, String> check = new TreeMap<String, String>();
		Domain domain = new Domain();
		
		ArrayList<String> domains = CurrentDomain.getDomains();
		
		request.setAttribute("domain", domain);
		request.setAttribute("domains", domains);
		request.setAttribute("check", check);
		request.setAttribute("title", "speedtestlab.com - Test speed website");
		request.setAttribute("keywords", "speedtestlab, speed test, content breakdown, wallterfal page, test performance, speed performance site");
		request.setAttribute("description", "speedtestlab.com provice full info about speed performance a website.");
		try {
			request.getRequestDispatcher("/pages/home.jsp").forward(request, response);
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
}
